import request from '@/utils/request'

export function getClassroomByPage(data = { pageNum: 1, pageSize: 100 }) {
  return request({
    url: '/info/classroom_search',
    method: 'post',
    data,
  })
}

export function getClassroomById(id) {
  return request({
    url: '/info/classroom_find',
    method: 'get',
    params: {
      id,
    },
  })
}

export function createClassroom(data) {
  return request({
    url: '/info/classroom_save',
    method: 'post',
    data,
  })
}

export function updateClassroom(data) {
  return request({
    url: '/info/classroom_editsave',
    method: 'post',
    data,
  })
}

export function deleteClassroomByIds(ids) {
  return request({
    url: '/info/classroom_del',
    method: 'post',
    data: {
      ids,
    },
  })
}
